-- GENERATED SPELL FOR [Sunseeker Astromage] --


function spell0_19168(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(35265,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19168', 0, 1)
end

function spell1_19168(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(38933,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19168', 0, 1)
end

function spell2_19168(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(17195,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19168', 1500, 1)
end

function spell3_19168(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(36807,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19168', 1500, 1)
end

function spell4_19168(pUnit, Event) --@Solarburn,n/a--
pUnit:FullCastSpellOnTarget(35267,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19168', 14000, 1)
end

function spell5_19168(pUnit, Event) --@Solarburn,n/a--
pUnit:FullCastSpellOnTarget(38930,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19168', 14000, 1)
end

function Sorts_19168(pUnit, Event)
local choix_sorts_19168 = math.random(0, 5)
if choix_sorts_19168 == 0 then
pUnit:RegisterEvent('spell0_19168', 1, 1)
end
if choix_sorts_19168 == 1 then
pUnit:RegisterEvent('spell1_19168', 1, 1)
end
if choix_sorts_19168 == 2 then
pUnit:RegisterEvent('spell2_19168', 1, 1)
end
if choix_sorts_19168 == 3 then
pUnit:RegisterEvent('spell3_19168', 1, 1)
end
if choix_sorts_19168 == 4 then
pUnit:RegisterEvent('spell4_19168', 1, 1)
end
if choix_sorts_19168 == 5 then
pUnit:RegisterEvent('spell5_19168', 1, 1)
end
end

function mob19168_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19168', math.random(1500, 3000), 1)
end

function mob19168_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19168_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19168_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19168, 1, 'mob19168_Action')
RegisterUnitEvent(19168, 2, 'mob19168_Leave')
RegisterUnitEvent(19168, 3, 'mob19168_Kill')
RegisterUnitEvent(19168, 4, 'mob19168_Die')
